package cn.sjxy.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@TableName("bookinfo")
@Data
public class Md_BookInfo {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String bookCode;
    private String bookName;
    private String typeCode;
    private BigDecimal sellPrice;
    private Integer totalSellQty;
    
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date publishDate;
    
    private String isSell;
    private String surfaceImg;
    private String author;
    private String introduce;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date addDate;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;
    
    private String remark;

    // 非数据库字段，用于显示
    @TableField(exist = false)
    private String typeName;  // 图书类型名称
}

